package com.jj.fly.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 数据中心模型
 * 
 * @author JJ
 *
 */
public class DataCenter<T> {

	/**
	 * 返回处理结果标识
	 * 
	 * 0：成功；1：失败
	 */
	private Integer flag;

	/**
	 * 返回数据
	 */
	protected List<T> dataList;

	protected T data;

	/**
	 * 返回参数
	 */
	private Map<String, String> parameters = new HashMap<String, String>();

	/**
	 * 返回数据集
	 */
	private Map<String, DataWrap> dataWraps = new HashMap<String, DataWrap>();

	/**
	 * 返回信息
	 */
	private String message;

	/**
	 * 返回错误信息
	 */
	private String errorMessage;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public Map<String, String> getParameters() {
		return parameters;
	}

	public void setParameters(Map<String, String> parameters) {
		this.parameters = parameters;
	}

	public Map<String, DataWrap> getDataWraps() {
		return dataWraps;
	}

	public void setDataWraps(Map<String, DataWrap> dataWraps) {
		this.dataWraps = dataWraps;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public List<T> getDataList() {
		return dataList;
	}

	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
}
